package com.source.lightfowl.idcardgrantandrecovery.dao;

import com.source.lightfowl.idcardgrantandrecovery.entity.IdCardRecovery;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: 谢春泳
 * @Description:
 * @Date: 2020/1/10 14:35
 */
public interface IdCardRecoveryDao extends JpaRepository<IdCardRecovery,Integer>, JpaSpecificationExecutor<IdCardRecovery> {
    @Modifying
    @Transactional
    @Query("delete from IdCardRecovery s where s.id in(?1)")
    void deleteBatch(ArrayList<Integer> ids);
}
